package org.zxp.javacheck.collect;

import org.junit.Test;

import java.util.*;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2021-06-23 01:31
 **/
public class CollectTest {
    public static void main(String[] args){
        List<String> list = new ArrayList<>();
        list.add("a");
        //list.add("b");
        list.add("c");
        System.out.println(list.containsAll(Arrays.asList("a", "c", "b")));
        System.out.println(list.containsAll(Arrays.asList("a", "b")));
    }


    @Test
    public void testMname(){
        Map<String,Integer> mmmmm = new HashMap<>();
        mmmmm.put("cccc",3333);
        Map<String, Integer> stringIntegerMap = get(mmmmm);
        System.out.println(stringIntegerMap);
    }


    public Map<String,Integer> get(Map<String,Integer> mm){
        mm.put("cccc",111);
        return mm;
    }
}
